package com.ttmall.common.pojo;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * Created by GalaIO on 2018/1/16.
 */
public class CategoryNode {

    @JsonProperty("u")
    private String url;

    @JsonProperty("n")
    private String name;

    @JsonProperty("i")
    private List<?> items;

    public static String buildName(long id, String name) {
        return "<a href='/products/" + id + ".html'>" + name + "</a>";
    }
    public static String buildUrl(long id) {
        return "/products/" + id + ".html";
    }
    public static String buildUrlName(long id, String name) {
        return "/products/" + id + ".html|" + name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<?> getItems() {
        return items;
    }

    public void setItems(List<?> items) {
        this.items = items;
    }
}
